﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="HHWeb.SystemManage.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>后台登录</title>
<style type="text/css">
body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;background-color: #016aa9;overflow:hidden;}
.sp {color: #000000;font-size: 12px;}
</style>
</head>
<body>
<form id="form1">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="962" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr><td height="235" background="../images/login_03.gif">&nbsp;</td></tr>
      <tr>
        <td height="53"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="394" height="53" background="../images/login_05.gif">&nbsp;</td>
            <td width="206" background="../images/login_06.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="16%" height="25"><div align="right"><span class="sp">用户</span></div></td>
                <td width="57%" height="25"><div align="center">
                  <input type="text"id="UserCode" name="UserCode" style="width:105px; height:17px; background-color:#292929; border:solid 1px #7dbad7; font-size:12px; color:#6cd0ff" />
                </div></td>
                <td width="27%" height="25">&nbsp;</td>
              </tr>
              <tr>
                <td height="25"><div align="right"><span class="sp">密码</span></div></td>
                <td height="25"><div align="center">
                  <input type="password" id="UserPassWord" name="UserPassWord" style="width:105px; height:17px; background-color:#292929; border:solid 1px #7dbad7; font-size:12px; color:#6cd0ff" />
                </div></td>
                <td height="25"><div align="left"><input type="button" id="BTLogin" name="BTLogin" style="width:49px;height:18px;border:0px; background-image:url(../images/dl.gif)"/></div></td>
              </tr>
            </table></td>
            <td width="362" background="../images/login_07.gif">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr><td height="213" background="../images/login_08.gif">&nbsp;</td></tr>
    </table>
    </td>
  </tr>
</table>
</form>
<%--Jquery验证区Start--%>
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(function () {
            $("#UserCode").focus();
            $("#UserCode,#UserPassWord").keydown(function (e) {
                var isie = (document.all) ? true : false;
                var key;
                var ev;
                if (isie) {//IE浏览器 
                    key = window.event.keyCode;
                    ev = window.event;
                }
                else {//火狐浏览器 
                    key = e.which;
                    ev = e;
                }
                if (key == 13) {
                    if (isie) {//IE浏览器
                        key = 9; //当ENter键按下时光标从当前位置移道下一个对象相当于(tab)功能
                        ev.returnValue = false;
                    }
                    else {//火狐浏览器
                        key = 9; //当ENter键按下时光标从当前位置移道下一个对象相当于(tab)功能
                        ev.preventDefault();
                    }
                    $("#BTLogin").click();
                }
            })
            $("#BTLogin").click(function () {
                if ($("#UserCode").val() == "" || $("#UserCode").val() == null) {
                    alert("登录帐号不能为空");
                    $("#UserCode").focus();
                    return;
                }
                if ($("#UserPassWord").val() == "" || $("#UserPassWord").val() == null) {
                    alert("登录密码不能为空");
                    $("#UserPassWord").focus();
                    return;
                }
                $("#form1").attr("method", "POST");
                $("#form1").submit();
            })
        })
    </script>
<%--Jquery验证区End--%>
</body>
</html>
